﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Model.DTO.Comment
{
    /// <summary>
    /// 添加评论DTO
    /// </summary>
    public class AddCommentDTO
    {
        /// <summary>
        /// 内容
        /// </summary>
        [Required(ErrorMessage = "内容不能为空"), MaxLength(8192,ErrorMessage = "内容不能超过128位")]
        public string Content { get; set; }
        /// <summary>
        /// 用户Id
        /// </summary>
        [Required(ErrorMessage = "用户Id不能为空")]
        public int UserId { get; set; }
        /// <summary>
        /// 浏览数量
        /// </summary>
        [Required(ErrorMessage = "浏览数量不能为空")]
        public int ViewNumber { get; set; }
        /// <summary>
        /// 点赞数量
        /// </summary>
        [Required(ErrorMessage = "点赞数量不能为空")]
        public int LikeNumber { get; set; }
        /// <summary>
        /// 评论数量
        /// </summary>
        [Required(ErrorMessage = "评论数量不能为空")]
        public int CommentNumber { get; set; }
        /// <summary>
        /// 收藏数量
        /// </summary>
        [Required(ErrorMessage = "收藏数量不能为空")]
        public int CollectNumber { get; set; }
        /// <summary>
        /// 备注(128)
        /// </summary>
        [MaxLength(128,ErrorMessage = "备注长度不能超过128位")]
        public string? Remark { get; set; }
        /// <summary>
        /// 文章Id
        /// </summary>
        public long? ArticleId { get; set; }
        /// <summary>
        /// 评论Id
        /// </summary>
        public long? CommentId { get; set; }
    }
}
